#ifndef FRACALCMAINWINDOW_H
#define FRACALCMAINWINDOW_H

#include <QMainWindow>
#include <QSlider>

class FrakOutController;
class FrakOutDataTableWidget;
class Panner;
class RecentFiles;
class RecentFilesViewQMenu;
class RecentFilesController;

namespace Ui {
    class FrakOutMainWindow;
}

class FrakOutMainWindow : public QMainWindow {
    Q_OBJECT
public:
    FrakOutMainWindow(QWidget *parent = 0);
    ~FrakOutMainWindow();

public slots:
    void slotAbout();
    void slotCurrentSheetChanged(int sheetIndex);
    void slotFillCellSelected();
    void slotNew();
    void slotOpen();
    void slotQuit();
    void slotRemoveCellSelected();
    void slotSave();
    void slotSaveAs();
    void slotZoomChanged(int value);
    void slotZoomIn();
    void slotZoomOut();

private slots:
    void slotRecentFileSelected(const QString& filename);
    void slotUndoStackCleanChanged(bool clean);

protected:
    void changeEvent(QEvent *e);
    void closeEvent(QCloseEvent *e);

private:
    int showCheckSaveChangesMessageBox();
    void createDockWindows();
    void createRecentFiles();
    void createToolButtonGroup();
    void newFile();
    void open();
    void updateWindowTitle();

private:
    FrakOutController *m_controller;
    FrakOutDataTableWidget *m_dataTableWidget;
    Ui::FrakOutMainWindow *ui;
    Panner *m_pannerWidget;
    RecentFiles *m_recentFiles;
    RecentFilesController *m_recentFilesController;
    RecentFilesViewQMenu *m_recentFilesView;
    QSlider *m_zoomSlider;

};

#endif // FRACALCMAINWINDOW_H
